package com.lbd.dynamicCode.bean;

import com.lbd.base.bean.AbstractEntity;
import lombok.*;
import org.hibernate.annotations.DynamicUpdate;
import org.jeecgframework.poi.excel.annotation.Excel;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.util.Date;

/**
 * 短信发送日志记录表
 * Created by zzl on 2017/11/19
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@DynamicUpdate
@Entity
public class MsgSendRecord extends AbstractEntity {
    //收件人手机号
    @Excel(name = "手机号")
    String phone;
    //内容
    @Excel(name = "内容")
    String content;
    //状态 -1删除 0未读 1已读 2激活
    Integer state;
    //短连接
    String shortLink;
    //激活时间
    @Column(updatable = false)
    Date activateDate;
    //激活时间
    @Column(updatable = false)
    Date sendTime;
    //标题
    String title;
    //落地页地址
    String landUrl;
    //自己的地址
    String locatedUrl;
    //批次ID
    String batchId;

    @Override
    public String toString() {
        return "MsgSendRecord{" +
                "phone='" + phone + '\'' +
                ", content='" + content + '\'' +
                ", state=" + state +
                ", shortLink='" + shortLink + '\'' +
                ", activateDate=" + activateDate +
                ", sendTime=" + sendTime +
                ", title='" + title + '\'' +
                ", landUrl='" + landUrl + '\'' +
                ", locatedUrl='" + locatedUrl + '\'' +
                ", batchId='" + batchId + '\'' +
                '}';
    }
}
